using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace BOMSWinService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            string[] args = Environment.GetCommandLineArgs();
            for (int i = 1; i < args.Length; i++)
            {
                // start with debug mode
                if (string.Compare(args[i], "-debug", true) == 0)
                {
                    Svc svc = new Svc();
                    svc.DebugStart();
                    Thread.Sleep(Timeout.Infinite);
                    return;
                }
            }

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new Svc() 
			};
            ServiceBase.Run(ServicesToRun);
        }
    }
}